package data;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;

public class Player {
	
	private double points = 0;
	private String name = null;
	
	private boolean isFree = true;
	
	private Set<Player> banList = null;
	
	public Player(String aName){		
		this.name = aName;	
		banList = new HashSet<Player>();
	}
	
	public void addPoints (double aPoints){
		points+=aPoints;
	}
	
	public void addToBan(Player player){
		banList.add (player);
	}		
	
	public Set<Player> getBanList(){
		return banList;
	}
	
	public boolean canPlay(Player wPlayer){
		if (banList.contains (wPlayer)){
			return false;
		} else {
			return true;
		}
	}
	
	public boolean isFree(){
		return isFree;
	}
	
	public void setBusy(){
		isFree = false;
	}
	
	public double points(){
		return points;
	}
	
	public String name(){
		return name;
	}	
	
 
}
